﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace INSTA.Concepts.StrategyPattern
{
    public class StandardPlayerStrategy : AbstractStrategy<Player>
    {
        /// <summary>
        /// Executes the current Strategy on the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        public override void Execute(Player target)
        {
            //1 : on bouge..
            target.RunAway();

            // 2 : S'il y a des ennemis..
            if (new Random().NextDouble() > 0.5f )
            {
                target.Attack();
            }
        }
    }
}
